<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
	
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap.css" rel="stylesheet" type="text/css" />
	<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-1.7.1.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js<?php echo Yii::app()->getBaseUrl();?>.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/ajaxupload.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/ajaxfileupload.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap-dropdown.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap-tab.js"></script>
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div class="main" id="page">
	<div id="header" class="header">
	<div class="navbar">
    <div class="navbar-inner">
      <div class="container">
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <a class="brand" href="#">NSN</a>
        <div class="nav-collapse">
        <?php 
            	if (Yii::app()->user->isGuest)
            	{
            	?>
            	<ul class="nav pull-right">            
            <li>
            
            <form class="well form-inline span5 nsn-thin nsn-loginform"  action="<?php echo Yii::app()->getBaseUrl();?>/login" method="POST">
				<table>
				  <tbody>
				  	<tr>
				      <td><input type="text" class="input-small span2" placeholder="Username" name="LoginForm[username]"></td>
				      <td><input type="password" class="input-small span2" placeholder="Password" name="LoginForm[password]"></td>
				      <td ><button type="submit" class="nsn-signin btn btn-primary">Sign in</button></td>
				      
				    </tr>
				    <tr>
				      <td><label class="checkbox">
						  <input type="checkbox"> Remember me
						</label>
					  </td>
				      <td><a href="#">Forgot password?</a></td>
				    </tr>
				  </tbody>
			    </table>				
			</form>            
          </ul>
          <?php }
          else 
          {?>
          
          <form class="navbar-search pull-left" action="">
            <input type="text" class="search-query span12" placeholder="Search">
          </form>
          <ul class="nav pull-right">
            
            <li class="active"><a href="#"><?php echo Yii::app()->user->getId()->username;?></a></li>
            <li ><a href="#">Home</a></li>
            <li class="dropdown">
              <a data-toggle="dropdown" class="dropdown-toggle" href="#"><b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="#">Account Setting</a></li>
                <li><a href="#">Privacy Setting</a></li>
                <li class="divider"></li>
                <li><a href="<?php echo Yii::app()->getBaseUrl();?>/logout">Logout</a></li>
              </ul>
            </li>            
          </ul>
          <?php }?>
        </div><!-- /.nav-collapse -->
      </div>
    </div><!-- /navbar-inner -->
  </div>
	</div><!-- header -->
	
    <?php echo $content; ?>

	<div class="clear"></div>
	<div id="footer">
	</div><!-- footer -->
</div><!-- page -->

</body>
</html>
